package com.jtzc.aikf.config;

import dev.langchain4j.memory.chat.MessageWindowChatMemory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class MemoryChatAssistantConfig {

    //  创建一个对象注入到spring 容器中;
    @Bean
    public MessageWindowChatMemory chatMemory(){
        return MessageWindowChatMemory.withMaxMessages(10);
    }
}
